using UnityEngine;
using System.Collections;

public class ExitButton : MonoBehaviour {

	// Use this for initialization
	void Start () {
		UIButtonMessage message = gameObject.AddComponent<UIButtonMessage>();
		message.functionName = "exit";
		message.target = gameObject;
	}
	
	// Update is called once per frame
	void Update () {
	
	}
	
	void exit()
	{
		Destroy(transform.parent.parent.gameObject);
	}
}
